<?php
include_once('../lib/Sqlexecutor.php');
include_once('../lib/Login.php');
include_once('../lib/Series.php');
include_once('../lib/CorpInfo.php');
include('log4php/Logger.php');

$dbh = new Sqlexecutor('localhost', 'tile', 'tile', 'tile');
Logger::configure('config.ini');
$logger = Logger::getLogger('intf');

$s = new CorpInfo($dbh, $logger);
$info = $s->getInfo();

if($info === false)
{
    $res['errno'] = -100;
}
else
{
    $res['errno'] = 0;
    $res['contents'] = $info;
}
$output = json_encode($res);
$logger->trace('res: ' . $output);

echo $output;
